package com.mine.androidlearn.api;



import com.mine.androidlearn.api.bean.WeatherInfoBean;

import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 *
 *
 * @author mine
 * @version V1.0 2018/8/6 22:34
 */
public interface IApiService {

    /*以下为测试学习用*/
//    @GET("Weather/Query?")
//    Observable<WeatherInfoBean> loadWeatherInfo(@Query("key") String key, @Query("cityname") String cityname);

    @FormUrlEncoded
    @POST("Weather/Query")
    Observable<WeatherInfoBean> loadWeatherInfo(@Field("key") String key, @Field("cityname") String cityname);

//    @GET("Weather/Query?")
//    Observable<HttpResponse<WeatherInfoBean>> loadWeatherInfo(@Field("key") String key, @Field("cityname") String cityname);

    /*以上为测试学习用*/

    @FormUrlEncoded
    @POST("v1/mobile/registerMobileDevice")
    Observable<HttpResponse<Void>> registerMobileDevice(@Field("deviceType") Integer deviceType,
                                                        @Field("deviceId") String deviceId,
                                                        @Field("deviceName") String deviceName);


}
